<html>
<head><meta charset="utf-8"><title>cargo gets confused compiling RA · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html">cargo gets confused compiling RA</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223166729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166729">(Jan 18 2021 at 21:55)</a>:</h4>
<p>I just got the following error after compiling RA with stable, then nightly, then switching back to stable:</p>
<div class="codehilite"><pre><span></span><code>error[E0460]: found possibly newer version of crate `la_arena` which `profile` depends on
   --&gt; crates/syntax/src/algo.rs:126:18
    |
126 |         let _p = profile::span(&quot;into_text_edit&quot;);
    |                  ^^^^^^^
    |
    = note: perhaps that crate needs to be recompiled?
    = note: the following crate versions were found:
            crate `la_arena`: /home/joshua/.local/lib/cargo/target/debug/deps/libla_arena-30ef6779a35b7e2f.rmeta
            crate `la_arena`: /home/joshua/.local/lib/cargo/target/debug/deps/libla_arena-af7c500c62bd5e59.rmeta
            crate `la_arena`: /home/joshua/.local/lib/cargo/target/debug/deps/libla_arena-af7c500c62bd5e59.rlib
            crate `profile`: /home/joshua/.local/lib/cargo/target/debug/deps/libprofile-6846f1b303b1dfdb.rmeta
</code></pre></div>
<p>Is this a known issue? Or should I report a cargo bug?</p>



<a name="223166764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166764">(Jan 18 2021 at 21:55)</a>:</h4>
<p>I don't know how I manage to always run into bugs the first time I compile a project <span aria-label="joy" class="emoji emoji-1f602" role="img" title="joy">:joy:</span></p>



<a name="223166782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166782">(Jan 18 2021 at 21:56)</a>:</h4>
<p>hmm, haven't seen that before</p>



<a name="223166815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166815">(Jan 18 2021 at 21:56)</a>:</h4>
<p>ok, will report a cargo bug</p>



<a name="223166821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166821">(Jan 18 2021 at 21:56)</a>:</h4>
<p>hopefully I can replicate <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="223166833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166833">(Jan 18 2021 at 21:56)</a>:</h4>
<p>I did notice r-a getting confused about la_arena though</p>



<a name="223166838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166838">(Jan 18 2021 at 21:56)</a>:</h4>
<p>Some imports weren't getting resolved</p>



<a name="223166860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166860">(Jan 18 2021 at 21:57)</a>:</h4>
<p>Looks like r-a was analyzing la_arena 0.1.x, while it was actually depending on 0.2</p>



<a name="223166881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166881">(Jan 18 2021 at 21:57)</a>:</h4>
<p>maybe you edited cargo.toml without restarting RA?</p>



<a name="223166923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166923">(Jan 18 2021 at 21:58)</a>:</h4>
<p>I think RA doesn't support changes to cargo.toml while it's running yet</p>



<a name="223166932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166932">(Jan 18 2021 at 21:58)</a>:</h4>
<p>it does support that</p>



<a name="223166942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223166942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223166942">(Jan 18 2021 at 21:58)</a>:</h4>
<p>that has not been my experience</p>



<a name="223167980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223167980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223167980">(Jan 18 2021 at 22:07)</a>:</h4>
<p>opened <a href="https://github.com/rust-lang/cargo/issues/9085">https://github.com/rust-lang/cargo/issues/9085</a></p>



<a name="223195824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223195824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223195824">(Jan 19 2021 at 07:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/cargo.20gets.20confused.20compiling.20RA/near/223166942">said</a>:</p>
<blockquote>
<p>that has not been my experience</p>
</blockquote>
<p>It mostly works, but you need to restart it for new proc macros and build scripts to kick in</p>



<a name="223238558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo%20gets%20confused%20compiling%20RA/near/223238558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo.20gets.20confused.20compiling.20RA.html#223238558">(Jan 19 2021 at 15:03)</a>:</h4>
<p><code>la_arena</code> is also confusing <code>cargo-outdated</code>https://github.com/kbknapp/cargo-outdated/issues/248</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>